package defpackage; import cn.wps.moffice.main.ad.s2s.CommonBean; import com.mopub.mobileads.VastExtensionXmlManager; import com.mopub.nativeads.MoPubNativeAdPositioning; import defpackage.fo; import defpackage.nzb; import defpackage.nzc; import org.xml.sax.Attributes; /* renamed from: nxp reason: default package */ public abstract class nxp { private static int qjV = 0; protected ejz eWH; protected mdl oGv; private ejk pdN; protected nyi qiJ; protected nya qiK = new nya(); protected aago qix; protected fo qjT; private nzd qjU; private boolean qjW; nxv qjX; nxp(aago aago, mdl mdl, ejk ejk) { ew.assertNotNull("part should not be null", aago); ew.assertNotNull("document should not be null", mdl); this.qix = aago; this.oGv = mdl; this.pdN = ejk; } /* access modifiers changed from: protected */ public ejz V(int i, Attributes attributes) { boolean z; Integer aL; fo.b fk; fo.b fl; int i2 = 0; ew.assertNotNull("shapeAttr should not be null", attributes); bK(attributes); String a = aayw.a(attributes, CommonBean.new_inif_ad_field_style, ""); if (a != null) { this.qjT = new aaop(a); } this.qiJ = new nyi(); this.qiJ.qix = this.qix; this.qiJ.eWw = this.oGv.bbf(); this.qiJ.qlW = bba(); this.qiJ.qaT = edw(); nyi nyi = this.qiJ; fo foVar = this.qjT; if (foVar != null) { gi fj = foVar.fj(); if (fj != null) { switch (nzc.AnonymousClass1.qov[fj.ordinal()]) { case 1: z = false; break; case 2: case 3: z = true; break; default: ew.eI(); z = false; break; } } else { z = false; } } else { z = false; } nyi.qlV = z; int type = this.oGv.getType(); nyi nyi2 = this.qiJ; ejz ejz = this.eWH; ew.assertNotNull("shapeAttr should not be null", attributes); ew.assertNotNull("vmlContext should not be null", nyi2); ew.assertNotNull("shape should not be null", ejz); ejo ejo = nyi2.eWw; if (nyi2.qaT) { aL = nmg.b(ejo); } else { String bS = nza.bS(attributes); if (!nyu.Lq(bS)) { aL = nmg.b(ejo); } else { aL = nmg.aL(bS, type); if (aL == null) { aL = nmg.a(bS, ejo); } else { if (ejo.sd(aL.intValue()) != null) { aL = nmg.b(ejo); } } } } ew.assertNotNull("it should not be null", aL); ejz.eWz = aL.intValue(); ew.assertNotNull("mShape should not be null", this.eWH); ejj ejj = new ejj(); boolean bba = bba(); ejj.it(bba); ejj.iu(edw()); ejj.iv(false); ejj.N(false); ejj.ix(false); ejj.iA(false); ejj.iB(true); ejj.iC(false); ejj.iD(!bba); c(ejj); a(attributes, ejj); this.eWH.a(ejj); edu(); bL(attributes); nza.a(this.qjT, this.eWH); W(i, attributes); edv(); ejz ejz2 = this.eWH; ew.assertNotNull("shapeAttr should not be null", attributes); ew.assertNotNull("shape should not be null", ejz2); String a2 = aayw.a(attributes, "alt", ""); if (a2 != null) { ejz2.oS(a2); } boolean z2 = this.qiJ.qlV; ejz ejz3 = this.eWH; ew.assertNotNull("shape should not be null", ejz3); ejz3.iV(z2); fo foVar2 = this.qjT; ejz ejz4 = this.eWH; ew.assertNotNull("attributes should not be null", attributes); ew.assertNotNull("shape should not be null", ejz4); Boolean b = aayw.b(attributes, "hr", "urn:schemas-microsoft-com:office:office"); if (b != null && b.booleanValue()) { ejz4.iX(true); String a3 = aayw.a(attributes, "hralign", "urn:schemas-microsoft-com:office:office"); if (a3 != null && !"left".equals(a3)) { if ("center".equals(a3)) { i2 = 1; } else if ("right".equals(a3)) { i2 = 2; } else { ew.eI(); } } ejz4.st(i2); Boolean b2 = aayw.b(attributes, "hrnoshade", "urn:schemas-microsoft-com:office:office"); if (b2 != null) { ejz4.iY(b2.booleanValue()); } Float c = aayw.c(attributes, "hrpct", "urn:schemas-microsoft-com:office:office"); if (c != null) { ejz4.aF((c.floatValue() / 100.0f) / 10.0f); } Boolean b3 = aayw.b(attributes, "hrstd", "urn:schemas-microsoft-com:office:office"); if (b3 != null) { ejz4.iZ(b3.booleanValue()); } if (!(foVar2 == null || (fk = foVar2.fk()) == null)) { ejz4.aH(npb.a(fk)); } if (!(foVar2 == null || (fl = foVar2.fl()) == null)) { ejz4.aG(npb.a(fl)); } } nyi nyi3 = this.qiJ; ew.assertNotNull("shapeAttr should not be null", attributes); ew.assertNotNull("vmlContext should not be null", nyi3); nyi3.qmf = aayw.b(attributes, "filled", ""); nyi3.qme = aayw.a(attributes, "fillcolor", ""); nyi3.qjE = aayw.a(attributes, "opacity", ""); nyi3.qmb = aayw.b(attributes, "stroked", ""); nyi3.qmc = aayw.a(attributes, "strokecolor", ""); nyi3.qmd = aayw.a(attributes, "strokeweight", ""); nyi3.qkn = aayw.b(attributes, "insetpen", ""); return this.eWH; } /* access modifiers changed from: protected */ public abstract void W(int i, Attributes attributes); /* access modifiers changed from: protected */ public bvk a(Attributes attributes, boolean z) { fo.b bVar; fo.b bVar2; fo.b bVar3; fo.b bVar4; fo.b bVar5; fo.b bVar6; fo.b bVar7 = null; boolean z2 = this.qiJ.qaT; fo foVar = this.qjT; if (z) { if (foVar != null) { bVar6 = foVar.fk(); bVar7 = foVar.fl(); } else { bVar6 = null; } return new bvk(0.0f, 0.0f, nzb.a(z2, 0.0f, bVar6), nzb.b(z2, 0.0f, bVar7)); } if (foVar != null) { bVar5 = foVar.fk(); bVar4 = foVar.fl(); bVar3 = foVar.fn(); bVar2 = foVar.fm(); bVar = foVar.fp(); bVar7 = foVar.fo(); } else { bVar = null; bVar2 = null; bVar3 = null; bVar4 = null; bVar5 = null; } float a = nzb.a(z2, bVar2, bVar); float b = nzb.b(z2, bVar3, bVar7); return new bvk(a, b, nzb.a(z2, a, bVar5), nzb.b(z2, b, bVar4)); } public void a(int i, String str, Attributes attributes) { ew.assertNotNull("attributes should not be null", attributes); switch (i) { case -1417835138: mdl o = npb.o(this.oGv); if (!this.qjW) { npb.c(o, this.eWH); } this.qjX = new nxv(this.qjT, this.eWH.baO(), o); nxv nxv = this.qjX; ew.assertNotNull("textboxAttr should not be null", attributes); nxv.qku = aayw.a(attributes, "inset", ""); nxv.cIg = aayw.a(attributes, CommonBean.new_inif_ad_field_style, ""); nfv.d(this.eWH, this.oGv.getType()); this.qjW = true; return; case -1296358048: this.eWH.iP(true); return; case -877694075: nyz nyz = new nyz(this.qix, this.oGv.bbf().aZG()); ejz ejz = this.eWH; ew.assertNotNull("imageAttr should not be null", attributes); String a = aayw.a(attributes, "id", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); String a2 = aayw.a(attributes, "pict", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); String a3 = aayw.a(attributes, "src", ""); if (a != null) { a2 = a; } aaoj b = nyu.b(a2, nyz.qix); evn evn = null; if (a3 != null) { int a4 = nyu.a(nyz.aYN, a3); if (-1 != a4) { evn = new evn(a4); nyz.a(attributes, evn); } } else if (b != null) { evn = nyz.a(attributes, npb.a(ejz, b, nyz.aYN)); } if (evn != null) { this.eWH.a(evn); v(this.eWH.eWy); return; } return; case 3143043: if (str.equals("urn:schemas-microsoft-com:vml")) { ejz ejz2 = this.eWH; ew.assertNotNull("vFillAttr should not be null", attributes); ew.assertNotNull("shape should not be null", ejz2); Boolean b2 = aayw.b(attributes, "recolor", ""); if (b2 != null) { ejz2.iT(b2.booleanValue()); return; } return; } return; case 3327275: ejz ejz3 = this.eWH; ew.assertNotNull("lockAttr should not be null", attributes); ejv ejv = new ejv(); Boolean b3 = aayw.b(attributes, "rotation", ""); if (b3 != null && b3.booleanValue()) { ejv.iG(b3.booleanValue()); } Boolean b4 = aayw.b(attributes, "aspectratio", ""); if (b4 != null && b4.booleanValue()) { ejv.iH(b4.booleanValue()); } Boolean b5 = aayw.b(attributes, "position", ""); if (b5 != null && b5.booleanValue()) { ejv.iI(b5.booleanValue()); } Boolean b6 = aayw.b(attributes, "selection", ""); if (b6 != null && b6.booleanValue()) { ejv.iJ(b6.booleanValue()); } Boolean b7 = aayw.b(attributes, "cropping", ""); if (b7 != null && b7.booleanValue()) { ejv.eWn.setBoolean(718, b7.booleanValue()); } Boolean b8 = aayw.b(attributes, "verticies", ""); if (b8 != null && b8.booleanValue()) { ejv.iK(b8.booleanValue()); } Boolean b9 = aayw.b(attributes, "text", ""); if (b9 != null && b9.booleanValue()) { ejv.iL(b9.booleanValue()); } Boolean b10 = aayw.b(attributes, "adjusthandles", ""); if (b10 != null && b10.booleanValue()) { ejv.eWn.setBoolean(721, b10.booleanValue()); } Boolean b11 = aayw.b(attributes, "grouping", ""); if (b11 != null && b11.booleanValue()) { ejv.iM(b11.booleanValue()); } Boolean b12 = aayw.b(attributes, "ungrouping", ""); if (b12 != null && b12.booleanValue()) { ejv.eWn.setBoolean(723, b12.booleanValue()); } ejz3.a(ejv); return; case 3657802: ejp baA = this.eWH.baA(); if (baA != null) { this.qjU = new nzd(); nzd nzd = this.qjU; if (attributes != null) { nzd.ckp = aayw.a(attributes, VastExtensionXmlManager.TYPE, ""); nzd.qow = aayw.a(attributes, "side", ""); } this.qjU.a(this.qiJ.qlV, baA); return; } return; case 548646960: this.eWH.a(nxd.a(attributes, this.eWH.baV())); return; default: return; } } /* access modifiers changed from: protected */ public void a(Attributes attributes, ejj ejj) { ejj.iw(false); } /* access modifiers changed from: protected */ public void b(ejp ejp) { fo.a fz; fo foVar = this.qjT; boolean aZf = this.eWH.aZf(); boolean aZg = this.eWH.aZg(); ew.assertNotNull("shapePos should not be null", ejp); if (foVar != null && (fz = foVar.fz()) != null && fz.Dd != null) { ejp.setRotation(ndz.b(fk.a(fz), aZf, aZg)); } } /* access modifiers changed from: protected */ public void bK(Attributes attributes) { this.eWH = npb.a(this.oGv.bbf(), bba()); } /* access modifiers changed from: protected */ public void bL(Attributes attributes) { hi hiVar; fv fvVar; int i; gj gjVar; gl glVar; gk gkVar; gm gmVar; int i2; int i3; int i4; int i5; int i6 = 1; ekc ekc = new ekc(); fo foVar = this.qjT; ew.assertNotNull("shapePos should not be null", ekc); if (foVar != null) { fo.b fu = foVar.fu(); if (!(fu == null || fu.Dd == null)) { ekc.aB(npb.a(fu)); } fo.b fw = foVar.fw(); if (!(fw == null || fw.Dd == null)) { ekc.aD(npb.a(fw)); } fo.b fv = foVar.fv(); if (!(fv == null || fv.Dd == null)) { ekc.aC(npb.a(fv)); } fo.b fx = foVar.fx(); if (!(fx == null || fx.Dd == null)) { ekc.aE(npb.a(fx)); } } b(ekc); ew.assertNotNull("shapeAttr should not be null", attributes); ew.assertNotNull("shapePos should not be null", ekc); Boolean b = aayw.b(attributes, "allowincell", "urn:schemas-microsoft-com:office:office"); if (b != null) { ekc.iF(b.booleanValue()); } ew.assertNotNull("shapeAttr should not be null", attributes); ew.assertNotNull("shapePos should not be null", ekc); Boolean b2 = aayw.b(attributes, "allowoverlap", "urn:schemas-microsoft-com:office:office"); if (b2 != null) { ekc.iE(b2.booleanValue()); } ekc.i(a(attributes, !this.qiJ.qlV)); ekc.az(1.0f); ekc.aA(1.0f); if (this.qiJ.qlV) { fo foVar2 = this.qjT; ew.assertNotNull("shapePos should not be null", ekc); if (foVar2 != null) { gjVar = foVar2.fq(); glVar = foVar2.fr(); gkVar = foVar2.fs(); gmVar = foVar2.ft(); } else { gjVar = null; glVar = null; gkVar = null; gmVar = null; } if (gjVar != null) { switch (nzb.AnonymousClass1.qor[gjVar.ordinal()]) { case 1: i2 = 0; break; case 2: i2 = 1; break; case 3: i2 = 3; break; case 4: i2 = 2; break; case 5: i2 = 4; break; case 6: i2 = 5; break; default: ew.eI(); i2 = 0; break; } } else { i2 = 0; } ekc.si(i2); if (glVar != null) { switch (nzb.AnonymousClass1.qos[glVar.ordinal()]) { case 1: i3 = 0; break; case 2: i3 = 1; break; case 3: i3 = 3; break; case 4: i3 = 2; break; case 5: i3 = 4; break; case 6: i3 = 5; break; default: ew.eI(); i3 = 0; break; } } else { i3 = 0; } ekc.sj(i3); if (gkVar != null) { switch (nzb.AnonymousClass1.qop[gkVar.ordinal()]) { case 1: i4 = 2; break; case 2: i4 = 0; break; case 3: i4 = 1; break; case 4: i4 = 3; break; case 5: i4 = 4; break; case 6: i4 = 5; break; case 7: i4 = 6; break; case 8: i4 = 7; break; default: ew.eI(); i4 = 2; break; } } else { i4 = 2; } ekc.se(i4); if (gmVar != null) { switch (nzb.AnonymousClass1.qoq[gmVar.ordinal()]) { case 1: i5 = 2; break; case 2: i5 = 0; break; case 3: i5 = 1; break; case 4: i5 = 3; break; case 5: i5 = 4; break; case 6: i5 = 5; break; case 7: i5 = 6; break; case 8: i5 = 7; break; default: ew.eI(); i5 = 2; break; } } else { i5 = 2; } ekc.sg(i5); if (foVar2 != null) { String fB = foVar2.fB(); if (fB != null) { ekc.av(Float.valueOf(fB).floatValue() / 10.0f); } String fC = foVar2.fC(); if (fC != null) { ekc.aw(Float.valueOf(fC).floatValue() / 10.0f); } } } else { this.eWH.iR(true); } fo foVar3 = this.qjT; ew.assertNotNull("shapePos should not be null", ekc); if (foVar3 != null) { hiVar = foVar3.fF(); fvVar = foVar3.fG(); } else { hiVar = null; fvVar = null; } if (hiVar != null) { switch (nzb.AnonymousClass1.qot[hiVar.ordinal()]) { case 1: i = 0; break; case 2: i = 1; break; case 3: i = 2; break; case 4: i = 3; break; case 5: i = 4; break; case 6: i = 5; break; default: ew.eI(); i = 1; break; } } else { i = 1; } ekc.sk(i); if (fvVar != null) { switch (nzb.AnonymousClass1.qou[fvVar.ordinal()]) { case 1: i6 = 0; break; case 2: break; case 3: i6 = 2; break; case 4: i6 = 3; break; case 5: i6 = 4; break; case 6: i6 = 5; break; default: ew.eI(); break; } } ekc.sl(i6); if (foVar3 != null) { String fD = foVar3.fD(); if (fD != null) { ekc.ax(Float.valueOf(fD).floatValue() / 10.0f); } String fE = foVar3.fE(); if (fE != null) { ekc.ay(Float.valueOf(fE).floatValue() / 10.0f); } } this.eWH.a(ekc); } /* access modifiers changed from: protected */ public abstract boolean bba(); /* access modifiers changed from: protected */ public void c(ejj ejj) { fp fh = this.qjT == null ? null : this.qjT.fh(); if (fh != null) { ew.assertNotNull("flip should not be null", fh); ew.assertNotNull("grf should not be null", ejj); switch (nzc.AnonymousClass1.pRP[fh.ordinal()]) { case 1: ejj.iy(true); return; case 2: ejj.iz(true); return; case 3: case 4: ejj.iy(true); ejj.iz(true); return; default: ew.eI(); return; } } } public void edr() { if (this.qjW) { this.qjW = false; npb.n(npb.o(this.oGv)); } ejp baA = this.eWH.baA(); if (baA != null && this.qjU == null) { this.qjU = new nzd(); nzd nzd = this.qjU; boolean z = this.qiJ.qlV; ew.assertNotNull("shapePos should not be null", baA); nzd.a(z, baA); } ew.assertNotNull("mShape should not be null", this.eWH); if (nxa.e(this.pdN)) { this.pdN.a(this.eWH); } } /* access modifiers changed from: protected */ public void edu() { hg fy = this.qjT == null ? null : this.qjT.fy(); this.eWH.setHidden(fy != null && hg.HIDDEN == fy); } /* access modifiers changed from: protected */ public void edv() { int intValue; if (this.qiJ.qaT) { intValue = qjV + 1; qjV = intValue; } else { Integer fA = this.qjT == null ? null : this.qjT.fA(); intValue = fA == null ? 0 : fA.intValue(); } if (intValue < 0) { intValue -= MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.eWH.iQ(true); } this.eWH.eWG = intValue; } /* access modifiers changed from: protected */ public final boolean edw() { return this.pdN != null; } /* access modifiers changed from: protected */ public void v(Integer num) { } }